//
//  StoreBottomView.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/10.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "StoreBottomView.h"

@implementation StoreBottomView

- (id)initWithFrame:(CGRect)aFrame inSuperView:(UIView *)aSuperView
{
    if (self = [super initWithFrame:aFrame inSuperView:aSuperView]) {
        NSArray * titArr = @[@"在线沟通",@"电话沟通"];
        NSArray * inageArr = @[@"icon_zaixiangoutong", @"icon_dianhuagoutong"];
        for (int i = 0; i < 2; i ++) {
            GLGWButton * bottomBut = [[GLGWButton alloc] initWithFrame:CGRectMake(KScreenWidth/2*i, 0, KScreenWidth/2, kHeightProportion_In_iPhoneTriploid(60)) titleText:titArr[i] titleLableFont:SYSTEMFONT(14) titleLableColor:[UIColor whiteColor] inSuperView:self];
            if (i==0) {
                bottomBut.backgroundColor = [UIColor colorWithHexString:@"#A89A60" alpha:0.6];
            } else {
                bottomBut.backgroundColor = [UIColor colorWithHexString:@"#A89A60"];
            }
            bottomBut.tag = 130+i;
            [bottomBut setImage:[UIImage imageNamed:inageArr[i]] forState:UIControlStateNormal];
            [bottomBut setImagePositionWithType:SSImagePositionTypeTop spacing:5];
            [bottomBut addTarget:self action:@selector(contactAction:) forControlEvents:UIControlEventTouchUpInside];
        }
    }
    return self;
}

- (void)contactAction:(GLGWButton *)sender
{
    if (self.Block_Contact) {
        self.Block_Contact(sender);
    }
}

@end
